package com.world.lzh.controller;

import com.world.lzh.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author lzh
 * @Date 2022/5/14 - 14:14
 * @Description
 * @Version 1.0.0
 **/
@RestController
@RequestMapping("/index")
@Api(description = "基础测试controller")
public class IndexController {

    @ApiOperation(value = "index方法")
    @GetMapping("/")
    public String index() {
        return "success";
    }

    @ApiOperation(value = "返回值为用户的方法")
    @GetMapping("/getUser")
    public User getUser() {
        return new User();
    }
}
